#ifndef __EEExpMain_H__
#define __EEExpMain_H__

#ifdef WIN32
	#pragma once
#endif

#pragma warning( disable : 4482 )

#include <maya/MFileIO.h>
#include <maya/MFileObject.h>
#include <maya/MObject.h>
#include <maya/MStatus.h>
#include <maya/MString.h>
#include <maya/MPxFileTranslator.h>
#include <maya/MFnMesh.h>

static const char* g_worldFileFormat = "wld";
static const char* g_modelFileFormat = "mdl";
static const char* g_propFileFormat = "ped";
extern const bool WRITE_ASCII;
class EEWorldExporter :
	public MPxFileTranslator
{
public:

	EEWorldExporter(void);
	~EEWorldExporter(void);

	MStatus		reader( const MFileObject& file,
						const MString& optionsString,
						FileAccessMode mode);

	MStatus		writer( const MFileObject& file,
						const MString& optionsString,
						FileAccessMode mode );

	bool        haveReadMethod	 () const { return false; }
	bool        haveWriteMethod	 () const { return true; }

	MString     defaultExtension () const;

	MFileKind   identifyFile(	const MFileObject& fileName,
								const char* buffer,
								short size) const;
	static void* creator()	{ return new EEWorldExporter; }
	MStatus		writeData(FILE* pFile);
	bool writeKDTree(FILE* pFile);

private:
	bool		m_bShort;
};


class EEPropExporter :
	public MPxFileTranslator
{
public:

	EEPropExporter(void);
	~EEPropExporter(void);

	MStatus		reader( const MFileObject& file,
						const MString& optionsString,
						FileAccessMode mode);

	MStatus		writer( const MFileObject& file,
						const MString& optionsString,
						FileAccessMode mode );

	bool        haveReadMethod	 () const { return false; }
	bool        haveWriteMethod	 () const { return true; }

	MString     defaultExtension () const;

	MFileKind   identifyFile(	const MFileObject& fileName,
								const char* buffer,
								short size) const;
	static void* creator()	{ return new EEPropExporter; }
	MStatus		writeData(FILE* pFile);

private:
	bool		m_bShort;
};


class EEModelExporter :
	public MPxFileTranslator
{
public:

	EEModelExporter(void);
	~EEModelExporter(void);

	MStatus		reader( const MFileObject& file,
						const MString& optionsString,
						FileAccessMode mode);

	MStatus		writer( const MFileObject& file,
						const MString& optionsString,
						FileAccessMode mode );

	bool        haveReadMethod	 () const { return false; }
	bool        haveWriteMethod	 () const { return true; }

	MString     defaultExtension () const;

	MFileKind   identifyFile(	const MFileObject& fileName,
								const char* buffer,
								short size) const;
	static void* creator()	{ return new EEModelExporter; }
	MStatus		writeData(FILE* pFile);

private:
	bool		m_bShort;
};

#endif



